<%--
  Created by IntelliJ IDEA.
  User: dd
  Date: 2023/4/26
  Time: 15:58
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>角色管理</title>
    <link rel="stylesheet" href="${pageContext.request.contextPath}/static/layui-v2.7.6/layui/css/layui.css" >
    <script src="${pageContext.request.contextPath}/static/layui-v2.7.6/layui/layui.js"></script>
    <style>
        body{padding: 6px 16px;}
        .demo-carousel{height: 200px; line-height: 200px; text-align: center;}
    </style>
</head>
<body>
<table id="demo" class="demo-carousel" lay-filter="test" ></table>
<script>
    layui.use(['table'], function(){
        var table = layui.table;
        table.render({
            elem: '#demo'
            ,id: 'test'
            ,url: '${pageContext.request.contextPath}/TabRoleServlet?method=query' //数据接口
            ,page: true //开启分页
            ,limit:5
            // ,toolbar:'default'
            // ,autoSort:false
            ,limits:[5,10,15,20,25,30,100,200]
            ,cols: [[ //表头
                // {type: 'checkbox', fixed: 'left',id: 'test'},
                {field: 'rid', title: 'ID', sort: true, fixed: 'left'}
                ,{field: 'rname', title: '角色名'}
            ]]
        });
    })
</script>
</body>
</html>
